<?php

include 'db_settings.php';

mysql_connect($mysql_host, $mysql_user, $mysql_password);
mysql_select_db($mysql_database);

$consulta = mysql_query("	SELECT result,type 
							FROM Results
							WHERE user='".$_REQUEST['user']."'");


while ($e = mysql_fetch_assoc($consulta)){
	//print ("Result: ".$e['result']);
	$output[] = $e;
}

print(json_encode($output));

mysql_close();

?>